Method and system for indexing electron diffraction patterns

ABSTRACT

A method is provided of indexing an electron diffraction pattern obtained from a crystalline sample. Indexing data comprising phase and crystallographic orientation information is obtained for first set of locations on the sample. A second set of locations to be indexed is identified. For each nominal location in the second set an experimental electron diffraction pattern is obtained, together with a simulated template from a number of previously indexed locations in the first set, the previously indexed locations being in a proximal region of the sample to the nominal location. Further simulated templates are generated by modifying the crystallographic orientation for the previously indexed locations at angular sub-intervals. The templates are compared with the experimental pattern for the nominal location and, using a similarity measure, a resultant indexing of the location is produced. A corresponding system is also disclosed.

CROSS-REFERENCE TO RELATED APPLICATION

This application claims priority to GB Patent Application Serial No. 2208289.5, filed Jun. 6, 2022, which is hereby incorporated herein by reference in its entirety.

FIELD OF THE INVENTION

The present invention relates to a method and system for indexing electron diffraction patterns.

BACKGROUND

In the materials analysis technique of electron backscatter diffraction (EBSD), an electron beam is focused onto a point on the surface of a sample. An electron detector (for example, a direct electron detector, or an indirect electron detector with a scintillator to convert the electrons to light) is used to collect an image of the resulting diffraction pattern from that point. The electron backscatter diffraction pattern (EBSP) is typically made up of multiple intersecting bands of higher intensity signal, referred to as Kikuchi bands. The relative positions and intensities of the Kikuchi bands are dependent upon the crystal structure, composition and the 3-dimensional orientation of the crystal lattice at the analysis point. Therefore, the measurement of the positions and intersecting angles of these Kikuchi bands in a single diffraction pattern can be compared to the atomic lattice structure of candidate crystal structures (phases) to confirm the phase and the crystallographic orientation. In this way the diffraction pattern can be “indexed”.

Conventional image processing methods, such as the Hough transform (or variants thereof) can be used to identify the positions of the Kikuchi bands in EBSPs obtained from materials being analysed. This information, combined with the known geometry of the experimental system, allows angles between the Kikuchi bands to be calculated. These angles are then compared with those in reference structures, allowing the phase and orientation of the point on the sample to be obtained. This standard indexing method is sometimes referred to as “Hough Indexing”. This indexing process can be repeated across a plurality of measurement locations on a regularly-spaced grid across the surface of the sample, with the results used to reconstruct orientation or phase maps for the analysis area.

The Hough-indexing method is very fast and produces robust results for most applications. Recently, pattern matching methods have been employed to improve the indexing results for poor quality diffraction patterns, or to improve the quality of data derived from high quality patterns (e.g. better angular precision in the orientation measurement). A “poor quality” pattern may result from a low signal-to-noise ratio in the Kikuchi bands or the superposition of multiple Kikuchi bands from different crystalline phases within the location at which the electron beam is incident for example. The pattern matching methods use an image correlation approach, typically comparing each experimental diffraction pattern to a series of simulated diffraction patterns (“templates”) to find the best fitting orientation and phase for every experimental diffraction pattern.

The volume of material from which the electron diffraction pattern originates is very small (e.g. with a typical diameter of 10 s to 100 s nm and a depth dependent upon the beam energy), but it is not negligible. Therefore, if the pattern source volume includes the boundary between two differently oriented crystallites (or grains) then the final imaged diffraction pattern will be a superposition of two separate diffraction patterns. Likewise, if the pattern source volume includes crystalline defects, such as atomic lattice dislocations, then the volume will cover a range of crystallographic orientations. These and other factors will result in poorer quality diffraction patterns that may not include a sufficient number of detectable Kikuchi bands from a single crystallite or a single orientation, and thus will either not be correctly indexed by the computer software using the Hough-indexing approach or else no possible solution will be found.

In almost all EBSD analyses, or those of the related technique of transmission Kikuchi diffraction (TKD), there are a fraction of locations that have either not been indexed, have been indexed with an incorrect solution or have been indexed with low confidence. It is usual practice to filter out these errors or low-confidence solutions in post-analysis data processing, as they will produce artefacts in measurements of grain size, boundary populations and phase fractions. In addition, as non-indexed points will often lie along the boundaries between adjacent grains, these gaps in the orientation data are usually filled in by duplicating the measurements of adjacent pixels until all points along the boundary have been assigned a phase and crystallographic orientation value.

This is demonstrated by the following example. FIG. 1 shows an “original” orientation map of grains formed from an array of pixels arranged in a grid array. Each pixel represents a location from which an EBSP is obtained and, where possible, the pattern of Kikuchi bands from that location is indexed. In FIG. 1 a combination of the phase and orientation of each location is indicated in greyscale (although typically in reality this is in colour). The original orientation map, shown on the left in FIG. 1 , includes a region of a sample in which a number of locations have not been indexed (black pixels) that lie predominantly along the grain boundaries (shown as black lines), plus a few incorrectly indexed points (“isolated errors”) that are significantly different in orientation (or phase) from all of the surrounding measurements (shown as pixels with black borders). In order to clean this orientation map, each of the isolated errors and the non-indexed locations are replaced by the phase and orientation information of a representative neighbouring pixel, to give the final, cleaned orientation map shown on the right in FIG. 1 .

In cases where there is a very low fraction of all the measurements (e.g. <5%) that need to be corrected, this cleaning approach using data duplication works well. However, for very deformed materials (with a low indexing rate), nanocrystalline structures (with multiple overlapping diffraction patterns) or in materials that contain many small, isolated grains (e.g. due to second phase precipitation) then this duplication approach will either remove valid measurements or will create artefacts as data is falsely duplicated into pixels that should have a different phase or orientation.

The use of pattern matching indexing methods can eliminate these non-indexed points and the isolated errors, as the pattern matching process is not reliant on the correct identification of individual Kikuchi bands within the diffraction patterns. However, for this indexing method, each experimental diffraction pattern needs to be compared to a very large number of simulated templates, each corresponding to a specific phase and crystallographic orientation. For a cubic phase, this will require the generation of over 100,000 templates (for a 2° initial precision) whereas for a low symmetry phase (e.g. monoclinic or triclinic crystal system) more than 1,000,000 templates will need to be generated and matched to each experimental pattern. Even with a high performance graphical processing unit (GPU) this process may be limited to 10-100 measurement locations per second (compared to Hough indexing speeds that can exceed 5,000 locations per second) and can therefore be prohibitively slow for large datasets.

Brute force methods of indexing, such as that described above, require substantial computing resources and are often too slow for may practical applications. For this, and other reasons, known methods of dataset repair focus on rapid indexing techniques (such as Hough indexing). In one such technique the position of Kikuchi bands from an experimental EBSP for a non-indexed point may be compared with a simulated Kikuchi pattern from a previously indexed neighbouring point. If there is a sufficient match the indexing of the previously indexed point is copied to that of the non-indexed point. This technique is fast but has inherent limitations in relying upon the indexing of the neighbouring point and on the assumption that the non-indexed point is identical in terms of phase and orientation.

There exists an ongoing need for improved methods of repairing of electron diffraction data containing locations at which indexing has not been possible or at which there is low confidence in the indexing solution which has been arrived at. In addition there exists a need for such improved methods to be sufficiently fast so as to allow them to be used in many different applications.

SUMMARY OF INVENTION

In accordance with a first aspect of the invention there is provided a method of indexing an electron diffraction pattern obtained from a sample of material having one or more crystalline phases, the method comprising:

-   -   a) obtaining indexing data associated with a first set of         locations on the sample, the indexing data comprising phase and         crystallographic orientation information for each location;     -   b) identifying a second set of locations on the sample to be         indexed;     -   c) obtaining a master dataset for each phase of the sample         material, each master dataset representing the three dimensional         distribution of the electrons scattered from a crystal of the         given phase;     -   d) for each nominal location in the second set:         -   i) obtaining an experimental electron diffraction pattern             from the nominal location;         -   ii) generating at least one first simulated template from at             least one respective related location to the nominal             location, the related location being in the first set and in             a proximal region on the sample to the said nominal location             in the second set, wherein the at least one first simulated             template represents a simulated electron diffraction pattern             generated using the master dataset and the indexing data for             the respective related location.         -   iii) for each at least one first simulated template,             generating one or more further simulated templates             representing simulated electron diffraction patterns for             crystallographic orientations corresponding to that of the             respective first simulated template and which are modified             at one or more crystallographic orientation sub-intervals             with respect to the first simulated template;         -   iv) comparing the first and further simulated templates with             the experimental electron diffraction pattern from the             nominal location so as to generate a corresponding             similarity measure; and,         -   v) analysing the similarity measures so as to select at             least one resultant indexed phase and orientation for each             nominal location.

We have realised that advantages over existing methods of indexing can be achieved by the use of pattern matching methods combined with previously acquired data from nearby measurement locations within the dataset. The orientation and phase data from nearby indexed points are used as a starting point for the simulation of diffraction pattern templates. These templates are then compared to the experimental pattern from the measurement location that is being considered and a subsequent refinement process finds the best matching phase and orientation for the analysis location in question.

The invention operates on the principle that the non-indexed locations, or those that have a low-confidence solution, are likely to share the phase and approximate orientation of a neighbouring location. Therefore, instead of needing to compare each experimental pattern with templates for all possible phases and orientations, it is only needed to compare to the phases of adjacent measurements and to a limited spread of orientations which are close to those of the locations in the proximal region. This reduction in orientations that need to be considered requires typically only a few hundred templates to be generated and matched for each measurement (compared to 100,000 s to millions for all orientations), thus dramatically minimising the analysis time yet still providing a refined solution that is not just a duplication of adjacent measurements.

The limited spread of orientations related to the orientation at which the first template was generated are described as orientation sub-intervals. This is to emphasize that the modification in the orientation is minor. The region of convergence is typically contained within about 2 degrees (about 0.04 rad) from the starting orientation. The step change in orientation between templates is typically much smaller, such as a number of 1 mrad.

Whilst other “pattern matching” indexing methods (so called “brute force indexing” methods) can be used to index each pattern from pixels that need repairing, these approaches consider all possible phases and orientations and are thus much slower. The present method only considers the phase and orientations close to nearby, already-indexed, measurements and thus is much faster.

The method is applied in the field of electron diffraction, this term being intended to include physical arrangements where the detector and incident electron beam are positioned upon the same side of the sample, namely electron backscatter diffraction (EBSD), as well as the newer techniques of transmission Kikuchi diffraction (TKD) (where the electron beam and the electron detector are on opposing side of the sample) and reflection Kikuchi diffraction (an emerging variant of EBSD where the sample is in a horizontal geometry). The technique is not limited to the scanning electron microscope, as it could be applied to any electron diffraction technique in electron microscopy that results in patterns with characteristic variations in signal intensities resulting from the crystal structure and crystal lattice orientation at the point/volume in the sample from which the diffraction pattern originates. With reference to the terms “crystal” and “crystalline” it should be understood that there is no intention to limit the present invention to materials which can be thought of as only crystalline. Rather the invention is intended to include phases or regions where the material is substantially amorphous. The degree of crystallinity which is needed by the invention is only that which is sufficient to produce Kikuchi bands with enough signal to noise ratio to enable an image analysis software to distinguish between correct (to a degree of confidence) and incorrect patterns and templates embodied as image data.

There are multiple advantages of this approach to dataset repair compared to existing methods. In particular there is no data duplication. Current methods for data repair (also referred to as “cleaning”) for EBSD datasets copy the phase and orientation values from adjacent measurement locations to the location needing repair. In contrast, the present method goes through a refinement process to improve or optimise the solution for the current diffraction pattern, so there is no data duplication, meaning that inaccuracies inherent with a duplication approach are avoided.

The accuracy of the templates generated at steps d(ii) and d(iii) may be increased if these include the use of geometric calibration data describing the relative positions of at least the location on the sample, the electron beam and the detector. Likewise, it is preferred that the first and further simulated templates are generated in accordance with similar experimental conditions as the obtained experimental diffraction patterns in step d(i).

Typically the first set of locations is indexed using a Hough indexing or pattern matching or template matching method. The step of obtaining the indexing data may include the loading of an appropriate file of data which has been previously indexed or it may also include generating the indexing data by performing the indexing process itself. As has been explained, the use of Hough indexing (and related approaches) in the present case is preferred for many applications due to its speed in comparison with dictionary indexing. This may also depend upon the degree of orientation intervals used in the dictionary indexing. Large intervals (typically in terms of magnitude of angular rotation about an axis) will improve speed but will statistically reduce the likelihood of a match with an experimental diffraction pattern.

The method relies upon the existence of an indexing solution being available for at least one location in the first set which is present within a proximal region on the sample.

The method may comprise, prior to step a, obtaining a number of experimental electron diffraction patterns from a sample of the material, according to a set of experimental conditions in which an electron beam is incident at a number of locations upon the sample and the scattered electrons are monitored by a detector; and attempting to index the patterns for each location.

Dependent upon the indexing method used, each location at which the electron beam was incident may be either indexed or not indexed. Furthermore, the indexing result at each location on the sample may be provided with a confidence measure based upon one or more of the following:

-   -   1) a measure of the diffraction pattern quality (which may         include expressions of Kikuchi band contrast and/or sharpness);     -   2) the number of detected Kikuchi bands, or groups of such         bands, used for the indexing process;     -   3) the difference between the positions of the Kikuchi bands as         detected and the equivalent bands in the result from the         analysis; and     -   4) the relationship between the highest ranking and lower         (typically second) ranking solutions.

The confidence measure may be used to assign a non-indexed status to a location. The first set of locations may therefore comprise only indexed locations which have met a sufficient threshold of the confidence measure. The second set of locations may therefore comprise locations for which no indexing solution could be obtained using the chosen indexing method, or locations for which a non-indexed status was assigned, even though an indexing solution was arrived at but which for the confidence measure threshold was not met.

The locations may be defined as points upon the sample at which the electron beam impinges on the sample surface, and wherein such points are provided in a pattern of points which are spaced apart from each other. Typically, the plurality of locations are arranged on the sample surface in an array. This may be a rectangular array (including square geometry), although in other cases a hexagonal array, or other geometry may be used. It will be understood that the number and relative positions of the locations can be freely modified according to the circumstances and application (including different spacings, different array parameters and indeed irregular positioning without the use of an array).

The success of the present method in assigning indexing of non-indexed locations is dependent in part upon how the indexed locations within the proximal region are selected and applied. In the case of a grid array, with the nominal location to be indexed being spaced at least one location apart from any edge of the array, the proximal region may comprise the eight surrounding locations in the grid array. Each of these eight locations may be used as the starting point for an initial indexing and refinement process. Thus, more generally, the at least one related location may be in a proximal region on the sample if it is a near neighbour of the nominal location. This may be a primary neighbour in the sense that it is directly adjacent to the nominal location. In some circumstances a secondary neighbour could be used, where the secondary neighbour is positioned such that one intervening location exists between the secondary neighbour and the nominal location.

The first and further templates are generated from a master diffraction pattern which includes predicted diffraction intensities for all crystal directions for the relevant phase. The master simulation can be generated using full dynamical, 2-beam dynamical or kinematical models as desired. Alternatively, it could be derived from experimentally collected diffraction patterns. Typically, the first and further templates use the same geometry calibration values for the relevant location. They also may be calculated using the same resolution as the experimental diffraction pattern to which they are compared, although the experimental diffraction pattern may be subjected to image processing to reduce its native resolution (for example using “binning”) in order to allow the template generation calculations and image comparison calculations to be performed more quickly.

The method may be applied to all locations from which electron diffraction patterns have been obtained. Typically however the method further comprises a step of selecting a subset of locations, each of which will become the nominal location for the method. The selected locations may be one or more of:

-   -   (i) locations with no successful indexing;     -   (ii) locations with a low data confidence (e.g. as defined by         the number of Kikuchi bands used for indexing, or some other         confidence metric); and,     -   (iii) locations or small clusters of locations (typically 5 or         fewer) that were indexed with a different phase and/or         orientation to the neighbouring locations.

The selection may be made using an automated process or with user input.

It will be recalled that an initial process to attempt to index each of the locations at which the electron beam is incident, will result in a set of locations for which indexing has been successfully achieved (the first set of locations), as well as a set for which indexing has not been achieved (included within the second set). In addition to attempting to index the non-indexed locations, there is benefit in refining the indexing of some locations for which an initial indexing solution was produced. Such indexed locations may be selected based upon the confidence measure discussed earlier. In particular, refinement of the indexing solution for any previously indexed location may be beneficial in regions which are within the proximal regions of non-indexed locations. In this case it is helpful to enhance the indexing quality of any locations which will be used as the starting point for indexing nominal locations which were not indexed. Furthermore, in some samples, where there exist small clusters of locations (such as one location, five or fewer locations, or ten or fewer locations) caused by microscopic precipitates for example, it is beneficial to be able to enhance the accuracy of the analysis by increasing the confidence in the indexing result.

Such locations which have been indexed and for which refinement of the indexing may be beneficial may be defined as a third set of locations. The third set of locations may comprise all locations which have been successfully indexed previously and which may therefore comprise the majority of the locations within a field of view for which the analysis is being performed.

The method may further comprise, for the third set of locations which are in the first set of locations:

-   -   e) for each nominal location in the third set:     -   vi) obtaining an experimental electron diffraction pattern from         the nominal location of the third set;     -   vii) obtaining at least one first simulated template         representing an electron diffraction pattern generated from the         nominal location of the third set using the indexing data         comprising phase and crystallographic orientation information,         wherein the simulated template is according to similar         experimental conditions as the obtained experimental diffraction         pattern;     -   viii) for each at least one first simulated template, generating         one or more further simulated templates representing simulated         electron diffraction patterns for crystallographic orientations         corresponding to that of the respective first simulated template         and which are modified at one or more crystallographic         orientation sub-intervals with respect to the first simulated         template;     -   ix) comparing the first and further simulated templates with the         experimental electron diffraction pattern from the nominal         location of the third set so as to generate a corresponding         similarity measure; and,     -   x) analysing the similarity measures so as to select at least         one resultant indexed phase and orientation for each nominal         location of the third set of locations.

Accordingly, this set of steps describes a method of refining the third set of locations. Whilst the first set of locations and third set of locations may be identical, typically the third set of locations has a smaller number of locations than the first set.

It is therefore preferred that the locations in the second and third sets are subjected to a refinement process in which further templates are generated at modified crystal orientations in an attempt to improve the matching between the templates and the experimental electron diffraction patterns. In one or each of these cases the repeated generation of further templates is preferably performed using the Nelder-Mead or Downhill Simplex methods.

A specific nominal location may be present in each of the first set, second set and third set, such that a resultant indexed phase and orientation is produced for each nominal location in accordance with each of step (v) and step (x); and wherein the method further comprises comparing the said resultant indexed phases and orientations so as to produce an updated resultant indexed phase and orientation for each said nominal location. An example of where this is beneficial is in the treatment of clusters of one of more locations. The locations in such a cluster may be analysed by improving the existing indexing solution for the location, by generating solutions based upon the nearby locations (instead of using the original indexing for the location) and by then comparing these to output an updated resulting solution. This process results in the resultant solutions having an increased level of certainty and accuracy.

The similarity measure used in the assessment of the second set and the third set may be the same or different. Preferably the same similarity measure is used. The similarity measure is typically an image correlation measure. The use of an image correlation measure is advantageous in that it does not rely on any crystallographic considerations. This also allows the use of a normalised cross correlation coefficient (NCCC) as the image correlation measure. The use of a similarity measure not only allows a comparison to be made between different solutions based upon different starting templates, it also allows a threshold level to be set in order to ensure that the template for the selected orientation solution is sufficiently similar to the experimental diffraction pattern. Thus, step d(v) a resultant indexed phase and crystallographic orientation is only selected if the correlation measure meets a given threshold (which may also be a dynamically calculated threshold based on the image quality). A similar requirement may be used for step e(x). In a practical example, the refinement process, coupled with the use of a minimum threshold for the NCCC value, ensures that only valid solutions are accepted. Those with an NCCC value below the threshold level may be rejected and classed as non-indexed points. This is not the case with conventional approaches which use data duplication methods. Whilst it has been found that using NCCC is beneficial for this particular purpose, another similarity measure which could be used is the “normalised inner product” (also called the “normalised dot product”) although this is less effective as it is influenced by the image intensity and mean levels.

The method described here is also advantageous in practice because it does not require the identification of Kikuchi band positions but instead looks at the pixel-to-pixel correlation of patterns and will thus provide a far more robust match even when the pattern quality is extremely poor (i.e. when Kikuchi bands are not clearly visible).

The method may further comprise displaying information relating to one or more of the phase identity and orientation of the crystal at the or each location. In this way the output may include orientation maps.

The method allows the indexing of locations in the second set for which a previously indexed location from the first set is in a proximal region. The result of the process is to produce a set of locations which are newly indexed for the first time. These newly indexed locations may then be used as locations within the first set if the method is repeated, thereby allowing further new locations to enter the second set which previously did not have a location from the first set within a proximal region. The method may therefore further comprise repeating the method one or more further times (typically step d), wherein for each repetition, the first set is updated using the newly indexed locations from the second set of locations indexed previously.

The method is presented as a number of steps. It is not intended that these steps must be performed only in the alphabetical and/or numerical order in which they are listed, unless the context requires it. For example step a and step b may be reversed, and step d(i) may be performed earlier than step b by obtaining experimental electron diffraction patterns for all locations on the sample. Furthermore, reference to an earlier step in the method should not imply that the earlier step is performed immediately before the current step in a step sequence, although it may be. Where groups of steps are said to be repeated, these need not exclude intervening steps.

In accordance with a second aspect of the invention there is provided a system for indexing an electron diffraction pattern obtained from a material having one or more crystalline phases, the system comprising a computer system including a central processing unit having a primary memory, wherein the system is configured when in use to perform the method according to the first aspect of the invention. The system may further comprise an electron detector configured to receive electrons scattered from a sample as a result of an electron beam interacting with the sample and to generate data representing the detected scattered electrons for analysis. In such a case the computer system and electron detector may be provided by a common vendor.

In accordance with a third aspect of the invention there is provided a computer program product comprising instructions which, when the program is executed by a computer, such as the computer system of the second aspect of the invention, cause the computer to carry out the method of the first aspect of the invention.

In accordance with a fourth aspect of the invention there is provided an apparatus for indexing an electron diffraction pattern obtained from a material having one or more crystalline phases, the apparatus comprising:

-   -   an electron beam system, including a number of lenses for         directing an electron beam, when in use, onto the surface of a         sample, wherein the electron beam interacts with the sample and         electrons are scattered from the sample; and,     -   a computer system configured to operate the system and to         analyse data representing the scattered electrons, the computer         system including a central processing unit having a primary         memory;     -   wherein the system is configured when in use to perform the         method according to the first aspect of the invention.

The apparatus may further comprise a sample holder for holding the sample to be analysed; and an electron detector configured to receive the electrons scattered from the sample as a result of the electron beam interacting with the sample and to generate the data representing the detected scattered electrons for analysis. Each of the sample holder and the electron detector may be a specialised apparatus selectable by a user of the system and obtained from a respective third party vendor according to the application in question. It will be understood that the system of the second aspect of the invention may be used as part of the apparatus according to the fourth aspect of the invention. The apparatus according to the fourth aspect of the invention may be an electron microscope.

BRIEF DESCRIPTION OF DRAWINGS

We now describe a system and method with reference to the accompanying drawings, in which:

FIG. 1 is a schematic illustration of how an original (left) orientation map may be cleaned (right) using a prior art method;

FIG. 2 is a schematic illustration of part of the vacuum chamber of a scanning electron microscope which includes a computer system;

FIG. 3 is a flow diagram of the initial stages of a method according to an embodiment;

FIG. 4 is a flow diagram showing the steps in the embodiment relating to locations where an indexing solution exists;

FIG. 5 is a flow diagram showing the steps in the embodiment relating to locations where an indexing solution does not exist;

FIG. 6 is a flow diagram showing the later steps in the embodiment;

FIG. 7 shows how an orientation map dataset may be repaired according to the method of the embodiment;

FIG. 8 shows how indexing may be achieved even with a low quality experimental image; and,

FIG. 9 shows an orientation map which illustrates the effectiveness of the method of the embodiment in analysing a sample which has undergone substantial deformation.

DETAILED DESCRIPTION

With reference to the accompanying drawings, FIG. 2 is a schematic representation showing some parts of a system that are employed in a scanning electron microscope (SEM) 1 for analysing a sample of material. The SEM electron beam 5 is produced inside an evacuated chamber and usually focussed with a combination of magnetic lenses forming the “SEM column”, the final part of which, the SEM final lens pole piece 10 is shown in FIG. 1 . When the focussed beam 5 strikes a sample held in a sample holder 15, some electrons are scattered back from the specimen (backscattered electrons or BSE) or interact with the specimen to produce secondary electrons (SE) and a number of other emissions such as X-rays. Kikuchi band patterns are caused by diffraction of the emerging backscattered electrons. The backscattered electrons BSE 20 are detected by an EBSD detector 25. A separate x-ray detector 30 is used to detect the x-rays for analysis.

An alternative geometry configuration uses a thin sample that is supported so that the focussed electron beam is transmitted through the sample and the detector is placed below the sample so that electrons scattered from beneath the sample strike the detector which is used to form an image that contains a “transmitted electron Kikuchi pattern” or TKD pattern.

The SEM 1 includes a computer system 50 which is used to operate the microscope, including receiving data from the EBSD detector 25. The computer system 50 takes a conventional form having input devices 55 such as a keyboard and mouse, and output devices 60 such as a display and printer. The computer system 50 has a central processing unit CPU 55. The CPU 55 includes a control unit 65 which controls the operation of the system 50 including its component parts. The CPU 55 includes an arithmetic and logic unit 70 which performs the majority of the processing underlying the method to be described. The CPU 55 also includes primary memory 75 in the form of RAM. External to the CPU 55 there is provided secondary memory 80 arranged as a solid state hard disc which has a much larger memory capacity than the primary memory 75. The secondary memory 80 is provided as a non-volatile memory. The control unit 65 may cause data from the secondary memory 80 to be loaded into the arithmetic and logic unit 70, although in order for this to be achieved it must be firstly loaded into the primary memory 75.

In the following description, an embodiment of the invention is provided. In this case a region of a two-phase sample of titanium has been analysed using conventional EBSD using the Hough-indexing method, resulting in 30% of the measurement locations within a grid array of such locations on the sample not being successfully indexed. The objective is to provide reliable phase and orientation information for as many pixels as possible within a given field of view image. The method now described is applied to each pixel which forms the image, subject to the requirement that, for each pixel, at least one neighbouring pixel is capable of being indexed so as to give a phase and orientation. Any pixel which does not meet this requirement is skipped over (ignored) by the method and will therefore either retain its original indexing, or remain unindexed, as applicable. The method serves to reduce the percentage of measurement locations which are not successfully indexed. It also increases the likelihood that pixels, either individually or in small clusters, which differ from surrounding pixels in terms of orientation and/or phase, have been correctly indexed.

The method uses electron backscatter diffraction patterns which are analysed from a two-phase titanium sample using the SEM 1. The sample is known to comprise two principal phases: a hexagonal (alpha) phase and a cubic (beta) phase. The sample is prepared for analysis using standard metallurgical techniques and is then loaded into the chamber of the SEM 1, in a conventional manner.

Reference is now made to FIG. 3 which shows the main steps of the method now described.

At step 300, the parameters are defined which are needed for the calculation, in step 305, of simulated master diffraction patterns for the two known phases in the sample. Thus, in this case there are two known “candidate phases” in the dataset which is to be generated, here these being the hexagonal (alpha) and cubic (beta) phases. The input parameters are the phase crystallography (space group and unit cell parameters), the atomic coordinates, the atom types and their occupancy at each atomic site, the electron beam energy, the minimum desired diffracted reflector intensity, the minimum lattice plane spacing, the Debye-Waller factor and the master simulation resolution. The phase atomic and crystallography data are usually included in a standard crystallography information file (*.cif format) and therefore can be readily obtained from such a file.

At step 305, a simulated master diffraction pattern in the form of a master simulation file is generated using the computer system 50 for each of the phases (alpha and beta), using the parameters defined in step 300. The computer system 50 used for this purpose is that used to control the microscope, although a separate computer system could be used instead. The master simulation file includes the predicted diffraction intensities for all crystal directions and is stored in the primary memory 75 of the computer system 50 for subsequent reference. The master simulation can be generated using full dynamical, 2-beam dynamical or kinematical models as desired. Alternatively, it could be derived from experimentally collected diffraction patterns. In the case of experimentally collected diffraction patterns, a number of such patterns may be obtained and then, based upon the information present in the experimentally collected patterns, used to produce a generalised master diffraction pattern.

The method then proceeds by analysing the experimental EBSD pattern at each location in the grid array in turn, according to the following series of steps performed for each location.

At step 310 the electron beam 5 is caused to be incident on the surface of the sample at each location of a 14 by 14 square grid array, with the distance between the locations being 30 nanometres. An electron backscatter diffraction (EBSD) pattern is generated at each location due to the interaction between the electron beam 5 and the sample material, and this is detected by the EBSD detector 25 forming part of the SEM 1. The EBSD pattern is stored by the computer system 50 in the primary memory 75 forming part of the microscope system, together with the position of the relevant location on the sample and the relative positions of the electron beam, sample and the EBSD detector 25. This information is also stored in the secondary memory 80 for later use as required.

The purpose of the use of an array of locations is to provide EBSD analysis information from an area of the sample as part of the overall field of view, for example to provide information including one or more of the size, orientation, distribution and relative quantities of the phases within the titanium sample.

At step 315 the diffraction patterns are indexed, where possible, using the Hough-indexing method and the phase and orientation data at each location are stored in the primary memory 75 of the computer system 50 (this being for a first set of locations). Where indexing is not possible, or indexing is only possible with a low confidence, no phase and orientation data are stored and the location is labelled as not indexed. The confidence in a measurement can be evaluated using a number of different techniques. In particular these may include any of the following techniques either alone or in combination:

-   -   a) a measure of the diffraction pattern quality;     -   b) the number of detected Kikuchi bands used for the indexing         (or potentially the number of groups of 3 or 4 bands used in the         indexing process);     -   c) the misfit (deviation) between the positions of the Kikuchi         bands as detected and the equivalent bands in the final         solution; and     -   d) a relationship between the top and second ranking solutions         (a greater difference generally indicating a higher confidence         in the top ranking solution).

It was noted earlier that the method is applied to all pixels in the image that have at least one neighbour pixel which is capable of being indexed. In general the pixels in the image correspond to locations upon the sample from which an individual EBSD pattern is measured. At step 320, some selection or filtering of the data within the dataset may be applied. This may be in accordance with user input or pre-defined settings. For example, typically locations with diffraction patterns below a predefined threshold of pattern quality are excluded from the dataset to be processed (for example, these may be measurement locations in voids, off the edge of the sample or from non-crystalline regions where there should be no valid solution). Rather than applying the method to all possible locations, during this step, data for locations that require improvement or validation may be identified (either automatically or as a result of user selection). These identified locations are typically:

-   -   (i) locations with no successful indexing;     -   (ii) locations with a low data confidence (e.g. as defined by         the number of Kikuchi bands used for indexing, or some other         confidence metric); and,         -   locations or small clusters of locations (typically 5 or             fewer) that were indexed with a different phase and/or             orientation to the neighbouring locations.

It will be appreciated that the relevant data for locations at which the indexing is desired to be improved will typically be a minority of locations within the total of the grid array. As such, the selection of these locations during this step is beneficial to the overall quantity of computing resources used.

At step 325, for those locations identified in the previous step 320, any locations which do not have at least one successfully indexed neighbouring measurement are eliminated, with the remaining data forming a dataset of a second set of locations. We note here that the successful indexing is in accordance with step 315 in which locations may be marked as not indexed even if an indexing solution exists, albeit with low confidence.

With reference to the neighbouring locations, in the present case of a grid array and thinking of each location as a square such that in combination the locations in the array are space-filling, for a nominal location which is at least one location spaced from the edge of the grid array, the neighbouring locations in this case comprise all locations which share an edge or corner with the present nominal location. With a square grid array there are therefore eight neighbours (four linked to the nominal location by sides and four linked by corners).

At step 330, for the first (or next) measurement location in the processing dataset, the experimental diffraction pattern is loaded into the primary memory 75. Note the pattern is usually loaded in its full, stored resolution but it can be reduced in size via pixel-binning to increase the speed of subsequent template matching.

If the measurement location was originally indexed successfully (but requires validation as might be the case for an isolated location or a member of a small cluster), then the method proceeds according to steps 335 to 370. If, however, there was no successful indexing of the pattern from this measurement location, then the method proceeds to step 375 to 410.

Indexing Data Exists For the Location

In situations where there is an existing indexing solution for the current location then the steps 335 to 370 described below, with reference to FIG. 4 , are directed at refining the indexing solution so as to improve its accuracy. The refined solution will then be compared with the solutions using data from neighbouring locations. Whilst there is an inherent benefit in improving the solution to the indexing from a scientific analysis perspective, this also serves to improve the indexing of any relevant neighbouring locations for which there is currently no indexing (see the section below: Indexing data from nearby locations), if the method is repeated.

At step 335, the relative geometry of the measurement location on the sample surface with respect to the detector 25 is defined. This is typically expressed as the position of the EBSD pattern centre on the detector (the pattern centre being defined as the point on the detector that is closest to the electron beam—sample interaction point, i.e. the “current location” which is the origin of the diffraction pattern) and the detector distance (the distance from the detector to the electron beam—sample interaction point). These geometry calibration values are calculated from the detector calibration values taking into account the focal plane of the electron beam (“working distance”) and the detector insertion distance in the chamber of the SEM 1.

At step 340, from the simulated master diffraction pattern (step 305) corresponding to the initially indexed phase at this location, a simulated diffraction pattern template is derived for the stored crystallographic orientation (from the earlier indexing), using the geometry calibration values for the relevant point and at the same resolution as the experimental diffraction pattern.

At step 345 the simulated template is then correlated to the experimental pattern within the primary memory 75. The similarity between the two images is calculated, in this case using the normalised cross correlation coefficient (NCCC) technique. This gives a value between 0 (images are completely different) and 1 (images are identical, or an inverse of each other).

At step 350 the NCCC value and corresponding orientation (for which the template has been simulated) are stored in the primary memory and the template is discarded.

At step 355 a new template is generated for a slightly modified crystallographic orientation and is matched to the experimental pattern and the corresponding NCCC value is calculated. A number of different approaches can be used to decide upon how the orientation is modified. The NCCC value is compared to that measured in the previous step to determine whether the match has improved or worsened. The template is then discarded from the primary memory 75.

At step 360 a new template is generated for a further slightly modified crystallographic orientation, where the direction of crystallographic rotation is determined by the change in NCCC value in step 350 and 355, and according to the overall approach being used to improve the NCCC value. The new template is matched to the experimental pattern and a new NCCC value calculated. The template is again discarded from the primary memory 75.

At step 365, steps 355 and 360 are repeated, using the chosen optimisation approach (e.g. Nelder-Mead or Downhill Simplex) to find the crystallographic orientation that gives the highest NCCC value. In the Nelder-Mead method for example, the orientation parameter angles are each modified individually to generate each template, in a first stage, and then combinations of these are considered in a later stage. The orientation changes are made progressively smaller between each new template until the change in NCCC between successive solutions is below a predetermined threshold or convergence tolerance such as 0.0005.

At step 370 the phase, orientation and refined NCCC value corresponding to the best matching template in the previous step are stored. Having improved the indexing solution using the optimisation approach, the method then goes on to seek other potential solutions for the indexing by considering the indexing of nearby locations.

Indexing Data From Nearby Locations

Steps 375 to 415 described below are followed, with reference to FIG. 5 , when either there already exists an indexing solution (and steps 335 to 370 have already been performed), or, where there is no existing indexing solution, for the current location (which is in the second set of locations).

At step 375, in a similar way to step 335, the relative geometry of the measurement location on the sample surface with respect to the detector 25 is defined. The data from step 335 may be used in this step if step 335 was performed previously. This is typically expressed as the position of the EBSD pattern centre on the detector (the pattern centre being defined as the point on the detector that is closest to the electron beam—sample interaction point, i.e. the “current location” which is the origin of the diffraction pattern) and the detector distance (the distance from the detector to the electron beam—sample interaction point). These geometry calibration values are calculated from the detector calibration values taking into account the focal plane of the electron beam (“working distance”) and the detector insertion distance in the chamber of the SEM 1.

At step 380, a first (or next) neighbouring measurement location that has been successfully indexed already, either by virtue of the Hough indexing at step 315, or as a result of earlier refining steps 335 to 370 (excluding any performed for the current location), is selected. From the simulated master diffraction pattern of the initially indexed phase at this neighbouring location, a simulated diffraction pattern template is derived for the stored crystallographic orientation at the neighbouring location, using the geometry calibration values as defined in step 375 and at the same resolution as the experimental diffraction pattern.

The next steps 385 to 410 are similar to steps 345 to 370, using the indexed solution from the neighbouring location and comparing it with the experimental diffraction pattern from the current non-indexed location, and proceeding through the similar refinement process.

At step 385 the simulated template is then correlated to the experimental pattern for the current location within the primary memory 75. The similarity between the two images is calculated, for example using the normalised cross correlation coefficient (NCCC) technique. This gives a value between 0 (images are completely different) and 1 (images are identical, or an inverse of each other).

At step 390 the NCCC value and corresponding orientation (for which the template has been simulated) are stored in the primary memory 75 and the template is discarded.

At step 395 a new template is generated for a slightly modified crystallographic orientation and is matched to the experimental pattern and the corresponding NCCC value is calculated. A number of different approaches can be used to decide upon how the orientation is modified. The NCCC value is compared to that measured in the previous step to determine whether the match has improved or worsened. The template is discarded from the primary memory 75.

At step 400 a new template is generated for a further slightly modified crystallographic orientation, where the direction of crystallographic rotation is determined by the change in NCCC value in step 390 and 395 and according to the overall approach being used to improve the NCCC value. The new template is matched to the experimental pattern and a new NCCC value calculated. The template is again discarded from the primary memory 75.

At step 405, steps 395 and 400 are repeated, using the chosen optimisation approach (e.g. Nelder-Mead or Downhill Simplex) to find the crystallographic orientation that gives the highest NCCC value. In the Nelder-Mead method for example, the orientation parameter angles are each modified individually to generate each template, in a first stage, and then combinations of these are considered in a later stage. The orientation changes are made progressively smaller between each new template until the change in NCCC between successive solutions is below a predetermined threshold or convergence tolerance such as 0.0005.

At step 410 the phase, orientation and refined NCCC value corresponding to the best matching template in the previous step are stored.

At step 415 the previous steps 380 to 410, are repeated, using the phase and orientation data from each neighbouring location that was previously indexed. The NCCC values and corresponding phase/orientations are stored for each previously indexed location. If the “nearest neighbour” locations are used then, for example when the locations are in a grid array, the maximum number of indexed locations for use as a starting point for indexing the non-indexed location is eight. Of course, where the non-indexed location is adjacent to the edge of the array (such as a side or corner position), or where not all neighbours have resulted in successful indexing, then the number of repetitions in this step 415 is reduced from eight.

In either case of where the present location was originally indexed or not indexed, the method then proceeds as discussed below and as illustrated in FIG. 6 .

At step 420 the phase and orientation of the template that best matches the experimental pattern at each location (highest refined NCCC value) is stored. In the case that the nominal location was not originally indexed, then there will be no solution from steps 335 to 370 and so the resultant solution for the nominal location that is stored will be the best of the number of solutions that resulted from the nearby locations considered in steps 375 to 415. In the case that the nominal location was originally indexed then there will be a solution from steps 335 to 370, together with a number of solutions from the locations considered in steps 375 to 415. In this case the best solution from all of these solutions is selected and stored as the resultant solution for the nominal location. This may therefore be the original solution (which has been refined using the optimisation), or one of the solutions originating from consideration of a nearby location.

At step 425 the NCCC of the resultant solution from step 420 above (the best matching phase and orientation) is compared to a predefined threshold (e.g. NCCC=0.15). If the NCCC value equals or exceeds this threshold, then the phase and orientation values are assigned to the measurement location and then stored to the computer primary memory 75. If the NCCC is below the threshold, then the results are discarded and the measurement is designated as “not indexed” in the primary memory 75.

At step 430 the method according to steps 330 to 425 is repeated for each of the locations identified in step 320. This typically results in one or more of:

-   -   1) a decrease in the number of locations for which there is no         indexing result output;     -   2) an increase in the accuracy of the indexing for some indexed         locations; and,     -   3) an increase in confidence that isolated locations or small         clusters of locations have been correctly indexed.

At an optional step 435, the method may be repeated from step 320, where the data for the locations now includes changes to the data resulting from a previous iteration. In particular this may now allow additional locations which were not selected for the previous dataset to be analysed because successful indexing of new locations from the previous iteration, now allows new locations to meet the requirement of being locations where at least one neighbouring location has been indexed. The optional step 435 may be executed one, two, three or more times and still cause an improvement in the overall indexing without introducing errors to an unacceptable level.

At step 440, once any optional iterations of the process have been completed according to step 435, the process then proceeds by outputting a “repaired” dataset for the locations in the grid array. Such a repaired dataset may be subjected to various further analytical processing. It is also typically displayed to a user of the SEM 1.

An example of the improvement in the quality of the indexing data resulting from the application of the method is shown in FIG. 7 . An original orientation map is shown on the left-hand side of FIG. 7 . Black pixels in the left-hand orientation map indicate where no original indexing was achieved, whereas the lighter shaded pixels are clusters of pixels (or isolated single pixels) that differ in orientation from all of their neighbours. The data was reprocessed using the steps outlined above, with a single iteration (not using step 435) and validating any cluster less than 5 pixels in area according to step 320. This resulted in the repaired map to the right-hand side of FIG. 7 . The remaining black pixels are locations where either the refined template matching did not result in a NCCC above the threshold value (0.15) or are locations that did not have neighbouring locations with an indexed orientation/phase.

A further example of the effectiveness of the method is illustrated in FIG. 8 . The method described above does not require identification of Kikuchi band positions (as would be the case for Hough indexing) but instead looks at the pixel-to-pixel correlation of patterns. This pixel-to-pixel comparison provides a far more robust match between experiment and simulation even when the pattern quality is extremely poor (i.e. when Kikuchi bands are not clearly visible). The image in FIG. 8 labelled “A” demonstrates this in that it shows an example experimental dataset, where a diffraction pattern with almost no visible Kikuchi bands can still be matched to a best fitting template (labelled “B”) and subsequently refined using the method presented above. An indication of the differences between the images A and B is shown in image C. The scale adjacent to each image is given in standard deviations from the mean value in each image.

FIG. 9 illustrates the effectiveness of the method in analysing a sample which has undergone substantial deformation. A large area of a deformed Ti sample was analysed using EBSD. The extreme deformation resulted in a poor EBSD pattern quality which in turn resulted in only 82.16% of the locations being indexed. The original orientation map is shown on the left-hand side of FIG. 9 with black pixels indicating points where the diffraction patterns could not be indexed. Reprocessing the non-indexed locations using brute force pattern matching methods, with no constraints on possible orientations, would take approximately 90 minutes on a personal computer with a low performance GPU. On the same computer, repairing the dataset using the method described above, using 5 pixels as the maximum cluster size and with two iterations across the whole dataset, took 4 minutes without needing a GPU. The resulting orientation map, after the present method has been applied, is shown on the right-hand side of FIG. 9 . It can be seen that the number of black pixels has been reduced significantly, with a final indexing rate of 99.64% (i.e. 812 pixels left unsolved, shown in black). 

1. A method of indexing an electron diffraction pattern obtained from a sample of material having one or more crystalline phases, the method comprising: a) obtaining indexing data associated with a first set of locations on the sample, the indexing data comprising phase and crystallographic orientation information for each location; b) identifying a second set of locations on the sample to be indexed; c) obtaining a master dataset for each phase of the sample material, each master dataset representing the three dimensional distribution of the electrons scattered from a crystal of the given phase; d) for each nominal location in the second set: i) obtaining an experimental electron diffraction pattern from the nominal location; ii) generating at least one first simulated template from at least one respective related location to the nominal location, the related location being in the first set and in a proximal region on the sample to the said nominal location in the second set, wherein the at least one first simulated template represents a simulated electron diffraction pattern generated using the master dataset and the indexing data for the respective related location. iii) for each at least one first simulated template, generating one or more further simulated templates representing simulated electron diffraction patterns for crystallographic orientations corresponding to that of the respective first simulated template and which are modified at one or more crystallographic orientation sub-intervals with respect to the first simulated template; iv) comparing the first and further simulated templates with the experimental electron diffraction pattern from the nominal location so as to generate a corresponding similarity measure; and, v) analysing the similarity measures so as to select at least one resultant indexed phase and orientation for each nominal location.
 2. A method according to claim 1, wherein each of steps d(ii) and d(iii) are performed using geometric calibration data describing the relative positions of at least the location on the sample, the electron beam and the detector.
 3. A method according to claim 1, wherein the first and further simulated templates are generated in accordance with similar experimental conditions as the obtained experimental diffraction pattern.
 4. A method according to claim 1, wherein the first set of locations is indexed using a Hough indexing, pattern matching or template matching method.
 5. A method according to claim 1, wherein, prior to step a, the method further comprises obtaining a number of experimental electron diffraction patterns from a sample of the material, according to a set of experimental conditions in which an electron beam is incident at a number of locations upon the sample and the scattered electrons are monitored by a detector; and attempting to index the patterns for each location.
 6. A method according to claim 1, wherein a location is selected for inclusion within the first or second sets of locations according to a confidence measure based upon one or more of the following: a measure of the diffraction pattern quality; the number of detected Kikuchi bands, or groups of such bands, used for the indexing process; the difference between the positions of the Kikuchi bands as detected and the equivalent bands in the result from the analysis; and the relationship between the highest ranking and lower ranking solutions.
 7. A method according to claim 1, wherein the at least one related location is in a proximal region on the sample if it is a near neighbour of the nominal location.
 8. A method according to claim 7, wherein the near neighbour related location is a primary neighbour being directly adjacent to the nominal location.
 9. A method according to claim 1, where the locations are defined as points upon the sample at which an electron beam impinges on the sample surface, and wherein such points are provided in a pattern of points which are spaced apart from each other.
 10. A method according to claim 1, wherein a plurality of locations are arranged on the sample surface in an array.
 11. A method according to claim 1, wherein the first and further templates are generated from a master diffraction pattern which includes predicted diffraction intensities for all crystal directions for the relevant phase.
 12. A method according to claim 11, wherein the first and further templates use one or each of: the same geometry calibration values for the relevant location, and, the same resolution as the experimental diffraction pattern.
 13. A method according to claim 1, further comprising selecting a subset of locations to form the nominal locations, wherein the subset of locations comprises one or more of: (i) locations with no successful indexing; (ii) locations with a low data confidence; and, (iii) locations or small clusters of locations that were indexed with a different phase and/or orientation to their neighbouring locations.
 14. A method according to claim 1, further comprising, for a third set of locations which are in the first set of locations: e) for each nominal location in the third set: vi) obtaining an experimental electron diffraction pattern from the nominal location of the third set; vii) obtaining at least one first simulated template representing an electron diffraction pattern generated from the nominal location of the third set using the indexing data comprising phase and crystallographic orientation information, wherein the simulated template is according to similar experimental conditions as the obtained experimental diffraction pattern; viii) for each at least one first simulated template, generating one or more further simulated templates represent simulated electron diffraction patterns for crystallographic orientations corresponding to that of the respective first simulated template and which are modified at one or more crystallographic orientation sub-intervals with respect to the first simulated template; ix) comparing the first and further simulated templates with the experimental electron diffraction pattern from the nominal location of the third set so as to generate a corresponding similarity measure; and, x) analysing the similarity measures so as to select at least one resultant indexed phase and orientation for each nominal location of the third set of locations.
 15. A method according to claim 14, wherein: a specific nominal location is present in each of the first set, second set and third set, such that a resultant indexed phase and orientation is produced for each nominal location in accordance with each of step d(v) and step e(x); and wherein the method further comprises comparing the said resultant indexed phases and orientations so as to produce an updated resultant indexed phase and orientation for each said nominal location.
 16. A method according to claim 14, wherein the image correlation measure is a normalised cross correlation coefficient, NCCC.
 17. A method according to claim 14, wherein one or each of step d(iii) or step e(viii), is performed using the Nelder-Mead or Downhill Simplex methods.
 18. A method according to claim 1, wherein the similarity measure is an image correlation measure.
 19. A method according to claim 1, wherein a resultant indexed phase and crystallographic orientation is only selected if the correlation measure meets a given threshold.
 20. A method according to claim 1, further comprising displaying information relating to one or more of the phase identity and orientation of the crystal at the or each location.
 21. A method according to claim 1, further comprising, repeating the method one or more further times, wherein for each repetition, the first set is updated using the newly indexed locations from the second set of locations indexed previously.
 22. A system for indexing an electron diffraction pattern obtained from a material having one or more crystalline phases, the system comprising: a computer system including a central processing unit having a primary memory, wherein the system is configured when in use to perform the method according to claim
 1. 23. A system according to claim 22, further comprising: an electron detector configured to receive electrons scattered from a sample as a result of an electron beam interacting with the sample and to generate data representing the detected scattered electrons for analysis.
 24. A computer program product comprising instructions which, when the program is executed by a computer, cause the computer to carry out the method of claim
 1. 